/**********************************************************************
 *** *                                                            * ***
 *** *  Copyright (c) 2013 Harmonia Holdings Group LLC            * ***
 *** *                                                            * ***
 *** * Permission is hereby granted to use, modify, copy, and     * ***
 *** * distribute this software and its documentation for any     * ***
 *** * purpose only without profit, provided that the above       * ***
 *** * Copyright Notice appears in all copies and that both the   * ***
 *** * Copyright Notice and this Permission Notice appears in     * ***
 *** * every copy of supporting documentation.  No title to nor   * ***
 *** * ownership of the software is transferred hereby.  The name * ***
 *** * of Harmonia Holdings Group LLC shall not be used in        * ***
 *** * advertising or publicity related to the distribution of    * ***
 *** * the software without specific, written, prior permission.  * ***
 *** * This software is provided as-delivered without expressed   * ***
 *** * or implied warranty.  Harmonia Holdings Group LLC          * ***
 *** * makes no representation about the suitability of this      * ***
 *** * software for any purpose and accepts no responsibility for * ***
 *** * its use.                                                   * ***
 *** *                                                            * ***
 *** ************************************************************** ***
 *** *                                                            * ***
 *** * This program is free software; you can redistribute it     * ***
 *** * and/or modify it under the terms of the GNU General Public * ***
 *** * License as published by the Free Software Foundation;      * ***
 *** * either version 2 of the License, or (at your option) any   * ***
 *** * later version.                                             * ***
 *** *                                                            * ***
 *** * This program is distributed in the hope that it will be    * ***
 *** * useful, but WITHOUT ANY WARRANTY; without even the implied * ***
 *** * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR    * ***
 *** * PURPOSE.  See the GNU General Public License for more      * ***
 *** * details.                                                   * ***
 *** *                                                            * ***
 *** * You should have received a copy of the GNU General Public  * ***
 *** * License along with this program; if not, write to the Free * ***
 *** * Software Foundation, Inc., 51 Franklin Street, Fifth       * ***
 *** * Floor, Boston, MA 02110-1301, USA.                         * ***
 *** *                                                            * ***
 *** * For more information: http://www.gnu.org/licenses/gpl.html * ***
 *** *                                                            * ***
 **********************************************************************/
package org.etexascode.interrep.datamodel;

import java.io.Serializable;
import java.util.List;

/**
 * Messaging class for passing metadata into an execution.
 * 
 * @author ablatt
 */
public class ExecMetaData implements Serializable {
	/** Serial ID. */
	private static final long serialVersionUID = 5981384824946380108L;
	
	
	/**
	 * The reference points to be used by the execution.
	 */
	ReferencePoint[] referencePoints;
	/**
	 * The calculator type to be used during the current execution.
	 */
	int geoCalculatorType;
	/**
	 * Simulated detectors for this specific execution
	 */
	List<Detector> execDetectors;

	/**
	 * Returns the actual array of reference points.
	 * TODO: ablatt - consider returning a cloned array of the reference points.
	 * @return Actual array of reference points.
	 */
	public ReferencePoint[] getReferencePoints() {
		if(referencePoints == null) {
			return null;
		} else {
			return referencePoints.clone();
		}
	}

	/**
	 * Set the actual array of reference points into the message.
	 * TODO: ablatt - consider cloning the array during setting
	 * @param referencePoints The reference points.
	 */
	public void setReferencePoints(ReferencePoint[] referencePoints) {
		if(referencePoints == null) {
			this.referencePoints = null;
		} else {
			this.referencePoints = referencePoints.clone();
		}
	}
	
	/**
	 * Getter for the calculator type
	 * @return The calculator type.
	 */
	public int getGeoCalculatorType() {
		return geoCalculatorType;
	}

	/**
	 * Setter for the calculator type
	 * @param geoCalculatorType
	 */
	public void setGeoCalculatorType(int geoCalculatorType) {
		this.geoCalculatorType = geoCalculatorType;
	}
	
	/**
	 * Getter for the simulated detectors for the current execution
	 * @return The exec detectors.
	 */
	public List<Detector> getExecDetectors() {
		return execDetectors;
	}

	/**
	 * Setter for the simulated detectors for the current execution
	 * @param execDetectors
	 */
	public void setExecDetectors(List<Detector> execDetectors) {
		this.execDetectors = execDetectors;
	}
}
